The patch fixes a problem when testing for device /dev/tpm0. The API
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 21 Mar 2006 17:57:23 +0000 (18:57 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 21 Mar 2006 17:57:23 +0000 (18:57 +0100)
call os.path.exists() must be called instead of os.path.isfile().

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
tools/xm-test/tests/vtpm/vtpm_utils.py

index 34e4afd583126900bd0a19940e3b8310c03f447b..d855e3231161caba4a84e75f0d528e6c7c9b54a3 100644 (file)
@@ -8,7 +8,7 @@ from XmTestLib import *
 if ENABLE_HVM_SUPPORT:
     SKIP("vtpm tests not supported for HVM domains")
 
-if not os.path.isfile("/dev/tpm0"):
+if not os.path.exists("/dev/tpm0"):
     SKIP("This machine has no hardware TPM; cannot run this test")
 
 status, output = traceCommand("ps aux | grep vtpm_manager | grep -v grep")